<?php


namespace apps\marriage\app\mp\controller;


use apps\marriage\core\service\UserService;

class MatchmakerController extends BaseMarriageMpController
{
    /**
     * @var UserService
     */
    private $userService;

    protected function init()
    {
        parent::init();
        $this->userService = service('User', SERVICE_NAMESPACE);
    }

    public function apply()
    {
        $this->userService->applyMatchmaker($this->user['id']);
        return $this->success();
    }
}